class TagController < ApplicationController

    def show_urls
        urls = []
        taggings = Tagging.find(:all, :conditions => ["tag_id=?", Tag.find_by_name(params[:name])])
        for t in taggings
            url = UsersUrls.find(t.taggable_id).url
            if !urls.include?(url)
                urls.push(UsersUrls.find(t.taggable_id).url)
            end
        end
        @urls = urls
        @tags = Tag.find(:all)

        render :controller => 'index'
    end
end
